<template>
  <div>
    <Form layout="inline" :model="formState" ref="formRef">
      <FormItem label="状态">
        <Select
          v-model:value="formState.statusList"
          :options="statusListOpt"
          style="width: 200px"
          mode="multiple"
          placeholder="请选择"
        ></Select>
      </FormItem>
      <FormItem label="编号">
        <Input v-model:value="formState.uid" style="width: 200px" placeholder="请输入"></Input>
      </FormItem>
      <FormItem label="描述">
        <Input v-model:value="formState.description" style="width: 200px" placeholder="请输入"></Input>
      </FormItem>
      <FormItem label="日期"> </FormItem>
      <div>
        <Tooltip title="查询">
          <Button type="primary" @click="search" shape="circle"
            ><template #icon><SearchOutlined /></template
          ></Button>
        </Tooltip>
        <Tooltip title="重置">
          <Button style="margin-left: 10px" @click="reset" shape="circle"
            ><template #icon><ReloadOutlined /></template
          ></Button>
        </Tooltip>
      </div>
    </Form>
  </div>
</template>
<script lang="ts" setup>
import { Tooltip, Form, FormItem, Select, Input, Button } from 'ant-design-vue';
import { SearchOutlined, ReloadOutlined } from '@ant-design/icons-vue';
import { ref } from 'vue';
import { ShiftTableParams } from '/@/api/work-order/workOrderManagement/eventManagementTenant/model/eventMgtTenantModel';
import { getStatus } from '/@/api/work-order/workOrderManagement/eventManagementTenant/eventMgtTenant';
const formState = ref({} as ShiftTableParams);
const statusListOpt = ref();
const getStatusListOpt = async () => {
  statusListOpt.value = await getStatus();
};
getStatusListOpt();

const emit = defineEmits(['get']);
const search = () => {
  emit('get', formState.value);
};

const reset = () => {
  formState.value = {} as ShiftTableParams;
  emit('get', formState.value);
};
</script>
